<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<script type="text/javascript" src="js/vue.min.js"></script>
<style type="text/css">
.red{color:red;}
.orange{color:orange;}
.yellow{color:yellow;}
</style>
</head>
<body>
<div id="myApp">
<h3>三目运算符</h3>
{{onOff ? 'yes' : 'no'}}
</div>
<script type="text/javascript">
var myApp = new Vue({
	el:"#myApp",
	data:{
		onOff:true,
		curColor:'red', 
	}
});
</script>
</body>
</html>